package Test;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author chihb
 * @create-time 2024/7/4 10:49
 * @description
 */
public class d {
    public static void main(String[] args) {
        Student[] students={
                new Student(165.3,"rffe",35),
                new Student(170.3,"rffe",15),
                new Student(150.3,"rffe",16),
                new Student(161.3,"rffe",19)};

        Arrays.sort(students, Comparator.comparingDouble(Student::getHeight));
        System.out.println(Arrays.toString(students));
    }
}
